import type { TModeUnit } from '@/stores/modules/app'

type TConfig = {
  [key in TModeUnit]: IModeConfig
}
interface IModeConfig {
  commonConfig?: IModeConfigValue
  headerConfig?: IModeConfigValue
  asideConfig?: IModeConfigValue
  articleConfig?: IModeConfigValue
  footerConfig?: IModeConfigValue
  componentConfig?: IModeConfigValue
}
export interface IModeConfigValue {
  [key: string]: any
}

// app theme preset color
export const appThemeList: string[] = [
  '#2d8cf0',
  '#0960bd',
  '#0084f4',
  '#009688',
  '#536dfe',
  '#ff5c93',
  '#ee4f12',
  '#0096c7',
  '#9c27b0',
  '#ff9800',
  '#FF3D68',
  '#00C1D4',
  '#71EFA3',
  '#171010',
  '#78DEC7',
  '#1768AC',
  '#FB9300',
  '#FC5404'
]

const setting = {
  //深色主题
  darkTheme: false,
  //系统主题色
  appTheme: '#18a058',
  //系统内置主题色列表
  appThemeList
}

export const config: TConfig = {
  'default-theme': {
    commonConfig: { mainBodyColor: '#18a058' },
    headerConfig: {
      headerLogoColor: '#fff',
      searchBackgroundColor: 'rgba(0, 0, 0, 0.1)',
      searchFontColor: '#fff',
      nickNameColor: '#fff'
    },
    asideConfig: {
      menuBackgroundColor: '#f6f6f7',
      menuFontSize: '16px',
      menuActiveFontSize: '18px',
      menuTitleColor: '#999',
      menuTitleFontSize: '12px',
      menuIconColor: '#858585'
    },
    articleConfig: {
      musicDiscovery: {
        banner: {
          dotBackgroundColor: '#e5e5e5',
          dotActiveBackgroundColor: '#ec4141',
          arrowBackgroundColor: 'rgba(0,0,0,.5)',
          arrowIconColor: '#fff'
        },
        section: {
          RecommendedPlaylistAlbum: {
            tooltipBackgroundColor: 'rgba(0,0,0,.6)',
            tooltipFontColor: '#fff',
            rightBottomCornerIconBackgroundColor: '#fff',
            rightBottomCornerIconColor: '#ec4141',
            mainTitleFontColor: '#333',
            rightTopCornerIconColor: '#fff',
            rightTopCornerFontColor: '#fff'
          }
        }
      }
    },
    componentConfig: {
      // naive scrollbar
      scrollbarColor: '#e0e0e0',
      scrollbarColorHover: '#969696',
      scrollbarWidth: '9px',
      scrollbarHeight: '9px',
      scrollbarBorderRadius: '2em'
    }
  }
}

export default setting
